<?php
if($intLs > 1) {
	$strCookieKey	= 'ubcmt' . $intUblastId;
	$intPage		= isset($_COOKIE[$strCookieKey]) ? $_COOKIE[$strCookieKey] : $objRequest->getParam('page',1);
	$intLimit		= COMMENT_LIMIT;
	$intOff			= (($intPage-1) * $intLimit);
	$intTotal		= 0;
	$strUrl			= HOST_VFRIEND . 'comment/ubcmt?ublastid=' . $intUblastId . '&';
	$intTotal	 	= $objFullhouse->getCmtTotal($intUblastId);
	if($intTotal > $intLimit && !isset($_COOKIE[$strCookieKey])) {
		$intPage 	= ceil($intTotal/$intLimit);
		$intOff 	= ($intPage - 1) * $intLimit;	
	}
	if($intOff >= $intTotal && $intOff) $intOff = $intTotal - $intLimit;
} else {
	$intOff 	= 0;
	$intLimit 	= COMMENT_LIMIT_TOP; 
	$intTotal	= $objFullhouse->getCmtTotal($intUblastId);
}
$arrComment		= $objFullhouse->getCmtAll($intLs,$intUblastId,$intOff,$intLimit);
$info			= $objFullhouse->get($intUblastId);
$this->view->arrComment		= $arrComment;
$this->view->intTotalCmt	= $intTotal;
$this->view->intLs			= $intLs;
$this->view->id				= $intUblastId;
$this->view->objUser		= $objVfriendUser->getFull($info['userid']);
if($intLs > 1) {	
	$this->view->intOffset	= $intOff;
	$this->view->intLimit	= $intLimit;
	$this->view->intPage	= $intPage;
	$this->view->strUrl		= $strUrl;
	
}
?>